package com.atguigu.gulimall.order.feign;

import com.atguigu.common.utils.R;
import com.atguigu.gulimall.order.vo.LockStockVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient("gulimall-ware")
public interface WareFeign {
    @GetMapping("/ware/waresku/getHasStock")
    public R getHasStock(@RequestParam List<Long> skuIds);

    @PostMapping("/ware/waresku/lockStock")
    public R lockStock(@RequestBody LockStockVo lockStockVo);
}
